{% load static %}
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>配置历史</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="{% static "users/bower_components/bootstrap/dist/css/bootstrap.min.css" %}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static "users/bower_components/font-awesome/css/font-awesome.min.css" %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static "users/bower_components/Ionicons/css/ionicons.min.css" %}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{% static "users/dist/css/AdminLTE.min.css" %}">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="{% static "users/dist/css/skins/_all-skins.min.css" %}">
    <link rel="stylesheet" href="{% static "users/dist/css/bootstrap-table.min.css" %}">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">

    <style>
        .dataTables_filter {
            float: right;
        {#margin-top: -95px;#}
        }

        .item-delete {
            cursor: pointer;
        }
    </style>
</head>

<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            配置数据
        </h1>
        <ol class="breadcrumb">
            <li>
                <a href="#"><i class="fa fa-dashboard"></i>主页</a>
            </li>
            <li class="active">历史配置</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <table id="table1" class="table table-bordered nowrap hover">
            <thead>
            <tr>
                <th>索引</th>
                <th>配置名称</th>
                <th>配置时间</th>
                <th>负载数据</th>
                <th>风资源数据</th>
                <th>光资源数据</th>
                <th>经济评价文件</th>
                <th>计算结果文件</th>
                <th>配置信息</th>
                <th>典型日展示</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for design in designs %}
                <tr data-design-id="{{ design.design_id }}">
                    <td>{{ forloop.counter }}</td>
                    <td>{{ design.d_name }}</td>
                    <td>{{ design.time }}</td>
                    <td><a href="/data/getHisFile/?catalog=load&mark={{ design.design_id }}">负载文件</a></td>
                    <td>{% if design.wind_is_selected %}
                        <a href="/data/getHisFile/?catalog=wind&mark={{ design.design_id }}">风资源文件</a>
                    {% endif %}</td>
                    <td>{% if design.solar_is_selected %}
                        <a href="/data/getHisFile/?catalog=light&mark={{ design.design_id }}">光资源文件</a>{% endif %}</td>
                    <td><a href="/data/getHisFile/?catalog=economic&mark={{ design.design_id }}">经济评价</a></td>
                    <td><a href="/data/getHisFile/?catalog=result&mark={{ design.design_id }}">计算结果</a></td>
                    <td><a href="/data/showParams/?which={{ design.design_id }}">规划配置</a></td>
                    <td><a href="/data/showTempDay/?which={{ design.design_id }}">典型日数据</a></td>
                    <td>
                        <a type="button" class="btn btn-danger item-delete" data-toggle="modal"
                                data-target=".modal-delete">删除
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>

        <div class="modal fade modal-delete" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
            <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">警告</h4>
            </div>
            <div class="modal-body">您正在执行删除历史计算操作，该操作将会永久删除历史数据，请确认</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="delete_confirm">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
        </div>
    </section>
</div>

<!-- jQuery 3 -->
<script src={% static "users/bower_components/jquery/dist/jquery.min.js" %}></script>
<!-- Bootstrap 3.3.7 -->
<script src={% static "users/bower_components/bootstrap/dist/js/bootstrap.min.js" %}></script>
<!-- ChartJS -->
<script src={% static "users/plugins/chart-js-2.8.0/dist/Chart.min.js" %}></script>
<!-- FastClick -->
<script src={% static "users/bower_components/fastclick/lib/fastclick.js" %}></script>
<!-- AdminLTE App -->
<script src={% static "users/dist/js/adminlte.min.js" %}></script>
<!-- AdminLTE for demo purposes -->
<script src="{% static 'users/bower_components/datatables.net/js/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'users/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js' %}"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>

<script src={% static "business/tools.js" %}></script>
{#<script src={% static "users/bower_components/bootstrap/js/modal.js" %}></script>#}
{#<script src={% static "users/bower_components/bootstrap/js/transition.js" %}></script>#}
<script src={% static "users/dist/cal_history.js" %}></script>

</body>

</html>